package cn.tedu.manager.exception;

import cn.tedu.response.StatusCode;
import lombok.Getter;

@Getter
public class ServiceException extends RuntimeException {
    private StatusCode statusCode;
    private String msg;
    private Integer code;

    public ServiceException() {
        this.statusCode = StatusCode.OPERATION_FAILED;
    }

    public ServiceException(StatusCode statusCode) {
        this.statusCode = statusCode;
    }

    public ServiceException(StatusCode statusCode, String msg) {
        this.statusCode = statusCode;
        this.msg = msg;
    }

    public ServiceException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
